package com.juanbonfante.components.main.buttons 
{
	import flash.display.Graphics;
	import flash.display.Sprite;

	/**
	 * @author jbonfante
	 * com.juanbonfante.components.main.buttons.DirectionArrow
	 * Created on: 8:11:30 PM , 2010 
	 */
	
	/**
		 * 	Simple UI Component Framework for AS3
		 
		 	The MIT License
	
			Copyright (c) 2010 Juan Bonfante
			
			Contributor(s):
			Juan Bonfante
			
			Permission is hereby granted, free of charge, to any person obtaining a copy
			of this software and associated documentation files (the "Software"), to deal
			in the Software without restriction, including without limitation the rights
			to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
			copies of the Software, and to permit persons to whom the Software is
			furnished to do so, subject to the following conditions:
			
			The above copyright notice and this permission notice shall be included in
			all copies or substantial portions of the Software.
			
			THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
			IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
			FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
			AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
			LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
			OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
			THE SOFTWARE.
		 */
	public class DirectionArrow extends Sprite 
	{
		protected static var _BG_COLOR:uint;
		protected static var _HI_LITE_COLOR:uint;
		protected static var _X_TRANSLATE:Number;
		protected static var _Y_TRANSLATE:Number;
		
		
//		 * TODO: Fix Buttons Draw Logic.
//		 * TODO: Tie to IComponent Interface
		
		public function DirectionArrow(BGCOLOR:uint=0xCCCCCC,HILITECOLOR:uint=0x000000, XTRANS:Number = -7.5, YTRANS:Number = -7)
		{
			_BG_COLOR = BGCOLOR;
			_HI_LITE_COLOR = HILITECOLOR;
			_X_TRANSLATE = XTRANS;
			_Y_TRANSLATE = YTRANS;
			
			var g:Graphics = this.graphics;
			g.beginFill(_BG_COLOR);
			g.drawRect(0 + _X_TRANSLATE, 0 + _Y_TRANSLATE, 15, 14);
			g.endFill();
			
			g.moveTo(3 + _X_TRANSLATE, 3+ _Y_TRANSLATE);
			g.beginFill(_HI_LITE_COLOR);
			g.lineTo(9 + _X_TRANSLATE, 3+ _Y_TRANSLATE);
			g.lineTo(6 + _X_TRANSLATE, 9+ _Y_TRANSLATE);
			g.lineTo(3 + _X_TRANSLATE, 3+ _Y_TRANSLATE);
			g.endFill();
			
			
		}
	}
}
